package cn.phonevane.utils;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;



/**
 * 权限限制�
 * 
 * @author Administrator
 * 
 */
public class SecurityTag extends TagSupport {

	private static final long serialVersionUID = 1L;
	/**
	 * 资源
	 */
	private int resource;
	/**
	 * 操作
	 */
	private int action;

	@Override
	public int doStartTag() throws JspException {

		HttpSession session = pageContext.getSession();
		Object o =  session.getAttribute("USER");
		if(o!=null){
			
			
				return EVAL_PAGE;
			
		}

		return SKIP_BODY;
	}
	
	
	public int getResource() {
		return resource;
	}

	public void setResource(int resource) {
		this.resource = resource;
	}



	public int getAction() {
		return action;
	}



	public void setAction(int action) {
		this.action = action;
	}
}
